As you all know, one of the key purposes of high performance computing HPC is to
accelerate science and push the limits of science. And given this purpose, it's more
than unfortunate that we don't always speak the same language, that is domain scientists
and high performance computing experts and enthusiasts. And domain scientists clearly
tend to prefer simple dynamic languages with interactivity, all these high level features,
like swotting and whatnot. And on the other end, in high performance computing, pretty
much nothing goes without static compiled languages like C, C++, Fortran, you name
it. And given these two different language choices, there is an apparent language barrier
between those two domains. And this has many, many unfortunate consequences. On the one
hand, domain scientists lose out on performance that they could perhaps rather easily get.
So their codes are running unnecessarily slow. On the other hand, it's also very difficult
for them to transition to HPC, to become HPC enthusiasts or maybe contributors to an HPC
library because of that language barrier. And on the other side, HPC might also lose
out on some of the features that these other languages have, interactive HPC as a password
or maybe there's something to be found there that could be interesting in HPC in itself.
And the Julia programming language that is aims to solve exactly this two language problem.
So the goal really is to tear down that barrier and establish a gradual transition between
domain size and high performance computing that you have one language that can be used
on both ends. You can use it interactively for your scientific application. You can plot
in it. You can do your data analysis in it. But at the same time, the goal is to have
a language that can compete with C and Fortran performance wise on clusters. And what I want
to talk about, as nature put it, by the way, Julia come for the syntax and stay for the
speed. So that's basically the transition from left to right. And I must say that personally,
I'm a physicist by training. I've done that transition myself. So I used or basically
I become involved in Julia because it fit my PhD goal in physics. And then it was one
of the reasons I gravitated toward HPC more and more. And what I want to talk about in
the next round about half an hour are the strengths and weaknesses of Julia to give
you a basis for deciding whether Julia could be of interest to you. So we'll talk about
strengths and weaknesses. And finally, if time permits, I also want to share a few impressions
from the Julia HPC community and say a few words about us.
All right. So let's start with the strength. And the first point I want to or the first
statement I want to put out is Julia code can be fast and scalable. It goes without
saying that this is a strong requirement if this language wants to have any chance of
being used for HPC. We have high standards when it comes to performance. We sometimes
obsessive. And how does Julia achieve these things? So the story is complex, but the two
key ingredients are type inference and compilation by LLVM. So basically, as is custom for dynamic
languages, in Julia, you typically don't specify types for your values. And Julia automatically
tries to infer the types of everything when you run a function or when it tries to compile
a function, that is. And if that's successful, so in the good case, it figured out all the
types and then eventually it has some compiler passes in Julia itself and finally hands it
over to LLVM. So it produces LLVM IR, which LLVM then just compiles to binary code specialized
for the hardware it had. And given this compilation pipeline, essentially the LLVM pipeline,
this basically means that you should expect from good Julia code the same performance as you would
expect from any other language like C or Fortran or whatever, if you use a LLVM compiler, which is,
I believe, the default nowadays for most languages. At least, you could compare it to Rust,
which is based on LLVM. And I think Clang is also LLVM based and MVCC and whatnot. Right.
And then eventually in HPC, we also want to make everything scalable. We want to use not just one
node, but all of these beautiful nodes that we have in our clusters. And the short story here is
that Julia has great MPI support. So basically, or for the most part, using MPI in Julia is the
same thing as using MPI in Fortran or C or whatever it calls into the same libraries. So once again,
Presenters
Zugänglich über
Offener Zugang
Dauer
00:35:36 Min
Aufnahmedatum
2024-05-07
Hochgeladen am
2024-05-08 15:06:06
Sprache
en-US
Speaker: Dr. Carsten Bauer, Paderborn Center for Parallel Computing (PC2)
Slides: https://hpc.fau.de/files/2024/05/bridging_science_hpc.pdf
Abstract:
Julia is a modern programming language that is particularly well suited for numerical computing. Its rich scientific ecosystem and dynamic features (e.g., interactivity) make it highly appealing to specialized domain scientists. At the same time, thanks to its LLVM-based “just ahead of time” compiler, Julia can often offer state-of-the art performance on modern CPUs and GPUs. The combination of these two facets makes it a promising option for HPC with intriguing technical and social potential. In practice, however, synergy effects are sometimes coupled with shortcomings, some of which can probably be overcome with increasing maturity, while others appear to be more fundamental.
In this HPC Café talk, I will share my experiences with Julia as a physicist, as an HPC consultant within the NHR, and as a long-time member of the Julia community. I will discuss the present state of the language and its potential from a HPC perspective while also shedding light on several noteworthy international Julia HPC projects.
Material from past events is available at: https://hpc.fau.de/teaching/hpc-cafe/